import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { HttpClientModule } from '@angular/common/http';
import { FormsModule } from '@angular/forms';
import { RouterModule, Routes} from '@angular/router'

import { AppComponent } from './app.component';
import { SubComponent } from './sub/sub.component';
import { MyformComponent } from './myform/myform.component';
import { AComponent } from './a/a.component';
import { BComponent } from './b/b.component';
import { CComponent } from './c/c.component';

const routes:Routes = [
  {path: 'a', component: AComponent},
  {path: 'b', component: BComponent},
  {path: 'c', component: CComponent}
];

@NgModule({
  declarations: [
    AppComponent,
    SubComponent,
    MyformComponent,
    AComponent,
    BComponent,
    CComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    FormsModule,
    RouterModule.forRoot(routes)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
